# -*- coding: utf-8 -*-


from PyQt5.QtWidgets import QSizePolicy, QLabel, QPushButton
from PyQt5.QtWidgets import QHBoxLayout, QVBoxLayout, QLineEdit
from PyQt5.QtCore import Qt,  QSize, QMetaObject, QCoreApplication


class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(388, 165)
        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(Form.sizePolicy().hasHeightForWidth())
        Form.setSizePolicy(sizePolicy)
        Form.setFixedSize(QSize(220, 120))
        Form.setWindowFlags(Qt.WindowCloseButtonHint)
        # 设置窗口无边框
        Form.setWindowFlags(Qt.FramelessWindowHint)
        Form.setStyleSheet(".QLineEdit {font: 75 '微软雅黑' 12pt;}"
                           ".QWidget {border-image: url('./static/player_background.png')}")

        # 标记窗口是添加收藏的歌单还是修改收藏的歌单名称
        self.Add_List_Flag = False

        # 上半部分、下半部分组成的全局水平布局
        self.horizontalLayout_3 = QHBoxLayout(Form)
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")

        # 上半部分、下半部分组成的垂直布局
        self.verticalLayout = QVBoxLayout()
        self.verticalLayout.setSpacing(5)
        self.verticalLayout.setObjectName("verticalLayout")

        # 歌单名称标签、歌单名称输入框组成的水平布局
        self.horizontalLayout = QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")

        # 歌单名称标签
        self.label = QLabel(Form)
        self.label.setObjectName("label")
        self.label.setStyleSheet("font: \'黑体\' 11pt; color: white;")
        self.horizontalLayout.addWidget(self.label)

        # 歌单名称输入框
        self.lineEdit = QLineEdit(Form)
        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.lineEdit.sizePolicy().hasHeightForWidth())
        self.lineEdit.setSizePolicy(sizePolicy)
        self.lineEdit.setObjectName("lineEdit")
        self.horizontalLayout.addWidget(self.lineEdit)
        self.verticalLayout.addLayout(self.horizontalLayout)
        
        # 确认按钮、取消按钮组成的水平布局
        self.horizontalLayout_2 = QHBoxLayout()
        self.horizontalLayout_2.setSpacing(90)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        
        # 确认按钮
        self.pushButton = QPushButton(Form)
        self.pushButton.setObjectName("pushButton")
        self.horizontalLayout_2.addWidget(self.pushButton)
        
        # 取消按钮
        self.pushButton_2 = QPushButton(Form)
        self.pushButton_2.setObjectName("pushButton_2")
        self.horizontalLayout_2.addWidget(self.pushButton_2)
        self.verticalLayout.addLayout(self.horizontalLayout_2)
        self.horizontalLayout_3.addLayout(self.verticalLayout)

        self.retranslateUi(Form)
        QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):
        _translate = QCoreApplication.translate
        Form.setWindowTitle(_translate("Form", "添加我的歌单"))
        self.label.setText(_translate("Form", "歌单名称"))
        self.pushButton.setText(_translate("Form", "确  认"))
        self.pushButton_2.setText(_translate("Form", "取消"))
